package com.singleton.sample{
	//import flash.utils.getDefinitionByName;
	import mx.core.Singleton;
	
	public class SampleSingleton{
		
	//	private static var implClassDependency:SampleSingletonImpl;
		private static var _impl:ISingletonSample;
		
		private static function get impl():ISingletonSample{
			if (!_impl)	{
				trace( 'registering singleton SampleSingleton' )
				Singleton.registerClass("com.singleton.sample::ISingletonSample",com.singleton.sample.SampleSingletonImpl);
				
				// create a new instance since we do not have one already
				_impl = ISingletonSample( Singleton.getInstance("com.singleton.sample::ISingletonSample"));
			}
			return _impl;
		}

 		public static function addEventListener( type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false ):void{
			impl.myAddEventListener( type, listener, useCapture, priority, useWeakReference )
		}

		public static function get tickCount( ):int{
			return _impl.tickCount;
		}

	}
}




